#include "customframe.h"

#include <QMouseEvent>
#include <QDebug>

CustomFrame::CustomFrame(QWidget *parent)
    : QFrame{parent}
{
    isEventAccept = true;
}

void CustomFrame::setEventAccept()
{
    isEventAccept = false;
}

void CustomFrame::mousePressEvent(QMouseEvent *event)
{
    if(isEventAccept){
        event->accept();
    }else{
        event->ignore();
    }
}

// void CustomFrame::mouseMoveEvent(QMouseEvent *event)
// {
//     event->accept();
// }

// void CustomFrame::mouseReleaseEvent(QMouseEvent *event)
// {
//     event->accept();
// }
